import request from "@/utils/request"

/**
 * 角色信息 前端接口
 *
 * @author haojun
 * @since 2022-06-12
 */
export default class RoleApi {
  static page(data) {
    let { pageIndex, pageSize, ...vo } = data
    return request.post(`/role/page/${pageIndex}/${pageSize}`, vo)
  }

  static list(data) {
    return request.post("/role/list", data)
  }

  static getById(id) {
    return request.get(`/role/${id}`)
  }

  static save(data) {
    return request.post("/role", data)
  }

  static update(data) {
    return request.put("/role", data)
  }

  static delete(id) {
    return request.delete(`/role/${id}`)
  }

  static deleteByIds(ids) {
    return request.delete("/role", ids)
  }

  static checked(roleId) {
    return request.get(`/role/checked/${roleId}`)
  }

};
